<h1>Listing courses</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Course category</th>
    <th>Sector</th>
    <th>Duration</th>
    <th>Value</th>
    <th>Tags</th>
  </tr>

<% @courses.each do |course| %>
  <tr>
    <td><%=h course.title %></td>
    <td><%=h course.course_category.title %></td>
    <td><%=h course.sector.title %></td>
    <td><%=h course.duration %> <%=h course.time_category.title %></td>
    <td><%=h course.value %> <%=h course.currency.title %></td>
    <td><%=h course.tags %></td>
    <td><%= link_to 'Show', course %></td>
    <td><%= link_to 'Edit', edit_course_path(course) %></td>
    <td><%= link_to 'Destroy', course, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New course', new_course_path %>